package com.duothread;

// 消费手机的任务类
public class CosumeTask implements Runnable {
    private PhoneFactory pf;

    public CosumeTask(PhoneFactory pf) {
        this.pf = pf;
    }

    @Override
    public void run() {
        while (true) {
            try {
                Thread.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            pf.get();
        }
    }
}
